let shopcatego = document.querySelector(".shopcatego-img");

// let host = "http://127.0.0.1:1337";
// 商品分类接口
let shopgatUrl = host + "/api/v1/product_categories";

let p1shop = axios.get(shopgatUrl);

p1shop.then(function(res) {
    // console.log(res.data.data);
    let shopgatoArr = res.data.data;
    let shopstr = shopgatoArr.map(item=> {
         return  ` 
         <div class="itemcate">
            <div class="itemName"><a href="shopdetail.html?id=${item.id}">${item.name}</a></div>
            <div class="item-img">
                <img src="${item.coverImage}" alt="">
            </div>
        </div>
         `
    }).join("");

    shopcatego.innerHTML = shopstr;

})
